var connector = require("../../../src/runtime/jaba");

(function($service$){
var $input$ = {};

/* Init code */

/* Remote code */
var $script$ = 'for group in root.Products.groupBy("Category") do (g0:group.Key.CategoryName; for product in group.Items do (g1:product.ProductName; g2:product.UnitPrice; g3:product.UnitsInStock) end; ) end; ';
var $batch$ = $service$.execute($script$, $input$, function($result$) {

/* Local code */
$result$.getIteration("group").forEach(function(group){
console.log(("Category=" + group.getString("g0")));
group.getIteration("product").forEach(function(product){
console.log(((((("Products: ProductName=" + product.getString("g1")) + " UnitPrice=") + product.getString("g2")) + " UnitsInStock=") + product.getString("g3")));
});
});

});
})(connector);